<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>
    function Box(){}

    function Foo(){}

    function Fn(){}

    Fn.prototype = new Foo()

    var b = new Box()
    var f1 = new Foo()
    var f2 = new Fn()


    console.log(Box.prototype.isPrototypeOf(b));    // t
    
    console.log(Box.prototype.isPrototypeOf(f1));   // f

    console.log(Foo.prototype.isPrototypeOf(f1));   // t

    console.log(Foo.prototype.isPrototypeOf(f2));   // t

    console.log(Fn.prototype.isPrototypeOf(f1));    // f

    console.log(Object.prototype.isPrototypeOf(f1));    // t
    console.log(Object.prototype.isPrototypeOf(f2));    // t
    console.log(Object.prototype.isPrototypeOf(b));    // t
    console.log(Object.prototype.isPrototypeOf(Fn));    // t
    console.log(Object.prototype.isPrototypeOf(Foo));    // t
    console.log(Object.prototype.isPrototypeOf(Box));    // t

    // 万物皆对象
    console.dir(Fn)


    console.log(b instanceof Box)
    console.log(f1 instanceof Box)
    console.log(f1 instanceof Foo)
    console.log(f2 instanceof Foo)
    console.log(f1 instanceof Fn)
    console.log(f2 instanceof Fn)
    console.log(b instanceof Object)
    console.log(f1 instanceof Object)
    console.log(f2 instanceof Object)
    console.log(Fn instanceof Object)
    console.log(Foo instanceof Object)
    console.log(Box instanceof Object)


</script>
</html>